package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 郝文雪
 * @date 2022/8/2 11:44
 * @Description Test
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {
    @RequestMapping("/sayhi")
    public String sayHi(){
        log.info("执行了sayHi方法");
        return "你好，sayhi";
    }

    @RequestMapping("/sayhello")
    public String sayHello(){
        log.info("执行了sayHello方法");
        return "你好，sayHello";
    }

    @RequestMapping("/getnumber")
    public int getNumber(int number){
        log.info("执行了getNumber方法");
        int num=number/0;
        return number;
    }
}
